package svgedit.TestSVG;

/**
 * test SVGElement class
 */

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import svgedit.svg.SVGLength;

public class SVGLengthTest
{
    
    /**
     * test getValueInSpecifiedUnits() method
     */
    @Test
    public void testgetValueInSpecifiedUnits()
    {
        int a = 1;
        float i = 2;
        SVGLength length = new SVGLength(a, i);
        // create new SVGLength
        assertTrue(i == length.getValueInSpecifiedUnits());
    }
    
    /**
     * test setValueInSpecifiedUnits() method
     */
    @Test
    public void testsetValueInSpecifiedUnits()
    {
        int a = 1;
        float i = 2;
        float s = 3;
        SVGLength length = new SVGLength(a, i);
        length.setValueInSpecifiedUnits(s);
        assertNotNull(length.getValueInSpecifiedUnits());
        assertFalse(2 == length.getValueInSpecifiedUnits());
        assertTrue(s == length.getValueInSpecifiedUnits());
    }
    
    /**
     * test getUnitType() method
     */
    @Test
    public void testgetUnitType()
    {
        int a = 1;
        float i = 2;
        SVGLength length = new SVGLength(a, i);
        assertNotNull(length.getUnitType());
        assertTrue(a == length.getUnitType());
    }
}
